cmake_minimum_required(VERSION 2.6)
project(Tutorial)

#The version number

set(Tutorial_VERSION_MAJOR 1)
set(Tutorial_VERSION_MINOR 0)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# configure a header file to pass some of the CMake settings to the source code
configure_file(
    "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in"
    "${PROJECT_BINARY_DIR}/TutorialConfig.h"
)
option(USE_MYMATH "use tutorial provided math implementation" ON)

if(USE_MYMATH)
    include_directories("${PROJECT_SOURCE_DIR}/MathFunctions")
    add_subdirectory(MathFunctions)
    set(EXTRA_LIBS ${EXTRA_LIBS} MathFunctions)
endif(USE_MYMATH)

add_executable(Tutorial tutorial.cxx)
target_link_libraries(Tutorial MathFunctions)

add_executable(racing racing.c)
add_executable(numconv numconv.cc)

add_subdirectory(sqlite)
add_executable(sqliteflag sqliteflag.cc)
target_link_libraries(sqliteflag sqlite3)



